import request from '@/utils/request'

// 查询会员资金列表
export function listFlow(query) {
  return request({
    url: '/huiyuan/flow/list',
    method: 'get',
    params: query
  })
}

// 查询会员资金详细
export function getFlow(flowId) {
  return request({
    url: '/huiyuan/flow/' + flowId,
    method: 'get'
  })
}

// 查询会员最新余额
export function getBalanceAfter(memberId) {
  return request({
    url: '/huiyuan/flow/balance/' + memberId,
    method: 'get'
  })
}
// 新增会员资金
export function addFlow(data) {
  return request({
    url: '/huiyuan/flow',
    method: 'post',
    data: data
  })
}

// 修改会员资金
export function updateFlow(data) {
  return request({
    url: '/huiyuan/flow',
    method: 'put',
    data: data
  })
}

// 删除会员资金
export function delFlow(flowId) {
  return request({
    url: '/huiyuan/flow/' + flowId,
    method: 'delete'
  })
}
